import request from '@/utils/request'
export function selectUnitList(queryParams) {
  return request({
    url: '/wa/unit',
    method: 'get',
    params: queryParams
  })
}
export function addUnit(data) {
  return request({
    url: '/wa/unit',
    method: 'post',
    data: data
  })
}
export function deleteUnit(unitId) {
  return request({
    url: `/wa/unit/${unitId}`, // 拼接单位id到路径中，匹配后端@PathVariable
    method: 'delete'
  })
}
export function updateUnit(data) {
  return request({
    url: '/wa/unit',
    method: 'put',
    data: data // 使用 data 传递请求体，匹配 @RequestBody
  })
}
